{% extends "base_generic.html" %}
{% block content %}
    <h1>All borrowed books</h1>
    {% if bookinstance_list %}
        <ul>
            {% for bookinstance in bookinstance_list %}
                <li class="{% if bookinstance.is_overdue %}text-danger{% endif %}">
                    <a href="{% url 'book-detail'  bookinstance.book.pk %}">{{ bookinstance.book.title }}</a>
                    ({{ bookinstance.due_back }}) - {{ bookinstance.borrower }}
                    {% if perms.catalog.can_mark_returned %}-
                        <a href="{% url 'renew-book-librarian' bookinstance.pk %}">Renew</a>
                    {% endif %}
                </li>
            {% endfor %}
        </ul>
    {% else %}
    {% endif %}

{% endblock %}
